package com.sunny.springboot2.entity;

import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * @author sunny
 * @date 2018/11/30
 */
@Data
public class ValidGroups {

    @NotNull(message = "id 不能为空", groups = Groups.Update.class)
    private Integer id;
    @NotBlank(message = "name 不能为空", groups = Groups.Default.class)
    private String name;
    @NotNull(message = "price 不能为空", groups = Groups.Default.class)
    private BigDecimal price;
}
